libtest: allow committing to alternative branches
authorDaniel Drake <drake@endlessm.com>
Wed, 3 May 2017 15:36:48 +0000 (09:36 -0600)
committerAtomic Bot <atomic-devel@projectatomic.io>
Mon, 22 May 2017 20:18:07 +0000 (20:18 +0000)
This will be used by the upcoming test-admin-upgrade-endoflife.sh

Closes: #874
Approved by: cgwalters

tests/libtest.sh

index 3ce718f9dd84eb85a34c0c4ece9548463cfcc860..1a81c755a52d307f39a34aed517f2807ecc41151 100755 (executable)
@@ -446,6 +446,7 @@ os_repository_new_commit ()
 {
     boot_checksum_iteration=${1:-0}
     content_iteration=${2:-0}
+    branch=${3:-testos/buildmaster/x86_64-runtime}
     echo "BOOT ITERATION: $boot_checksum_iteration"
     cd ${test_tmpdir}/osdata
     rm boot/*
@@ -464,7 +465,7 @@ os_repository_new_commit ()
 
     version=$(date "+%Y%m%d.${content_iteration}")
 
-    ${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit  --add-metadata-string "version=${version}" -b testos/buildmaster/x86_64-runtime -s "Build"
+    ${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit  --add-metadata-string "version=${version}" -b $branch -s "Build"
     cd ${test_tmpdir}
 }